function [logdens] = make_dens_c1( param )
% Compute pseudo log density to find identified set via MCMC.

% Global variables:

global samp
global N

% Cutoff (tolerance) for objective function
% (allow one pair of individuals to want to add a project)

cutoff = 1/N^2;

% Show current parameter vector:

param

% Make objective matrix:

[N_prefs, N_alphas, alpha_list, start_H] = make_Q_c1( param );

% Solve QP problem:

if samp
    [~,objval,LPslack] = solve_samp(N_prefs, N_alphas, alpha_list, start_H);
else
    [~,objval,LPslack] = solve_pop(N_prefs, N_alphas, alpha_list, start_H);
end

% Log pseudo-density:

logdens = - max(0, objval - cutoff) / cutoff * 2;

end
